import deptListResponse from "@/apis/mock/dept.json";
import http from "@/common/http";

export async function queryDept(params?: any, useMock?: boolean) {
  if (useMock) {
    return Promise.resolve(deptListResponse)
  }
  return http.get('/api/sys/dept/list', params)
}

export async function removeDept(data: number[]) {
  return http.post('/api/sys/dept/delete', data)
}

export async function addDept(data: any) {
  return http.post('/api/sys/dept/add', data)
}

export async function updateDept(data: any) {
  return http.put('/api/sys/dept/update', data)
}
